function isProd() {
    return process.env.NODE_ENV === "production"
}

const prodExternals = {}

const vueConfig = {
    pages: {
        index: {
            entry: "src/main.js",
            title: "Local APP"
        },
    },
    configureWebpack: {
        externals: isProd() ? prodExternals : {}
    },
    css: {
        sourceMap: isProd()
    },
    devServer: {
        open: true,
        index: process.env.VUE_APP_INDEX_BASE_URL,
        openPage: process.env.VUE_APP_OPEN_PAGE_URL,
        port: 80,
        hot: true
        // ,proxy: {
        //     "/mvc": {
        //         changeOrigin: true,
        //         target: 'http://localhost:8080/lee'
        //     }
        // }
    },
    productionSourceMap: false,
    lintOnSave: true,
    publicPath: isProd() ? "/lee/" : "/",
    assetsDir: "./",
    filenameHashing: false
};

module.exports = vueConfig;
